package com.kwlt.smc.service;

import java.util.ArrayList;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.kwlt.smc.dao.ChannelDao;
import com.kwlt.smc.entity.Channel;



/**
 * 用户管理类
 * @author xushunxin
 *
 */
//Spring Bean的标识.
@Component
//默认将类中的所有public函数纳入事务管理.
@Transactional(readOnly = true)
public class ChannelService {
	private static Logger logger = LoggerFactory.getLogger(ChannelService.class);
	@Autowired
	private ChannelDao channelDao;
	
	/**
	 * 查询通道详细信息
	 * @param id
	 * @return
	 */
	public Channel getChannel(Long id){
		return channelDao.findOne(id);
	}

	public List<Channel> findChannel() {
		return channelDao.getChannelList();
	}
	
	
}
